package com.wen.config.EquipmentFilter;

import com.wen.config.DefaultPropertyConfig;
import com.wen.entry.bean.Property;

import java.util.List;


// 过滤好的属性
public class BetterPropertyNameFilter implements Filter<Property> {
    private final List<String>  keyWords;


    public BetterPropertyNameFilter() {
        keyWords = new DefaultPropertyConfig().getKeywords();
    }


    @Override
    public boolean test(Property property) {
        for (String keyWord : keyWords) {
            if (property.getName().contains(keyWord)){
                return true;
            }
        }
        return false;
    }
}
